<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>OR Dealer</title>
<?php $this->load->helper('HTML');
echo link_tag('css/style2.css');
echo link_tag('images/favicon.ico','shortcut icon','image/x-icon');
?></head>
<?php
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=or_dealer.xls");
header("Pragma: no-cache");
header("Expires: 0");
?>
<body>
               <table width="90%" border="1" cellpadding="1" cellspacing="1" align="center" class="detail">
                    <thead>
                        <tr class="detail2">
                        <th>No.</th>
                        <th>Nama Dealer</th>
                        <th>Nama Upline</th>
                        <th>Unit</th>
                        <th>Wilayah</th>
                        <th>Omset</th>
                        <!--<th>Action</th>-->
                    </tr>
                    </thead>
                    <tbody>
                    <?php
                    $no=1;
					$hasil = 0;
                    foreach($belanjadealer as $row):
						//if ($data_pv_dealer->num_rows()>0) :
						 	//foreach($data_pv_dealer as $row1):
							$hasil = $this->Penjualan_model->omset_anak($row->strkode_dealer,$bulan);
							if($row->omset >=300000 and $hasil !=''){
						?>
							<tr class="data">
							<td><?php echo $no;?></td>
							<td><?php echo $row->strnama_dealer?></td>
							<td><?php echo $row->strnama_upline?></td>
							<td><?php echo $row->strnama_unit?></td>
							<td><?php echo $row->strnama_cabang?></td>
							<td><?php echo $row->omset?></td>
							<!--<td align="center"><?php //echo anchor ('laporan/print_or2/'.$row->strkode_upline."/".$id_cabang."/".$nama_bulan," View", array('class' =>"update", 'target'=>"_blank"));?></td>-->
						</tr>
                    <?php 
					$no++;
						}
					 endforeach; ?>
                    </tbody>
                </table>
</body>
</html>
